package com.ysstech.reportworld.service;

import com.ysstech.common.entity.TreeNode;
import com.ysstech.reportworld.entity.Customer;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ysstech.reportworld.entity.DataCustomer;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 报表世界客户信息 服务类
 * </p>
 *
 * @author lishuangliang
 * @since 2022-04-28
 */
public interface CustomerService extends IService<Customer> {
    /**
     * 查询客户树信息
     *
     * @return
     */
    public List<TreeNode> queryCustomerTree() throws Exception;


    /**
     * 查询所有下级客户的客户集合
     *
     * @param id 客户编号
     * @return
     * @throws Exception
     */
    public List<Customer> queryListReportCustomer(String id) throws Exception;

    /**
     * 查询所有下级客户的客户id集合
     *
     * @param id
     * @return
     * @throws Exception
     */
    public List<String> queryCustomerIds(String id) throws Exception;

    /**
     * 获取客户信息
     *
     * @return
     * @throws Exception
     */
    public Map<String, Customer> getCustomerMap() throws Exception;

    /**
     * 添加客户信息
     *
     * @param customer
     * @throws Exception
     */
    public void addCustomer(Customer customer) throws Exception;

    /**
     * 修改客户信息
     *
     * @param customer
     * @throws Exception
     */
    public void editCustomer(Customer customer) throws Exception;

    /**
     * 删除客户信息
     *
     * @param id
     * @throws Exception
     */
    public void delCustomer(String id) throws Exception;

    /**
     * 获取客户对应表信息
     *
     * @return
     */
    public List<DataCustomer> getTableInfo(DataCustomer dataCustomer) throws Exception;


    /**
     * 导出客户许可文件 Base64 加密  提供给升级工具使用
     */
    public String customerBase64(Customer customer) throws Exception;


    /**
     * 客户json格式信息
     */
    public String getCustomerJsonInfo() throws Exception;
}
